package com.thinksns.sociax.t4.android.findpeople;


import android.content.Intent;
import android.view.View;
import android.widget.TextView;

import com.thinksns.sociax.android.R;
import com.thinksns.sociax.t4.android.data.StaticInApp;
import com.thinksns.sociax.t4.android.fragment.FragmentSociax;

/**
 * Created by Administrator on 2016/10/21.
 */

public class FindPeopleySexFragment extends FragmentSociax implements View.OnClickListener {
    TextView tvAll, tvBoy, tvGirl;

    @Override
    public int getLayoutId() {
        return R.layout.fragment_findpeople_bysex;
    }

    @Override
    public void initView() {
        tvAll = (TextView) findViewById(R.id.tv_all);
        tvBoy = (TextView) findViewById(R.id.tv_boy);
        tvGirl = (TextView) findViewById(R.id.tv_girl);
    }

    @Override
    public void initIntentData() {

    }

    @Override
    public void initListener() {
        tvAll.setOnClickListener(this);
        tvBoy.setOnClickListener(this);
        tvGirl.setOnClickListener(this);

    }

    @Override
    public void initData() {

    }

    @Override
    public void onClick(View v) {
        Intent intent = new Intent(inflater.getContext(), ActivitySearchUser.class);
        intent.putExtra("type", StaticInApp.FINDPEOPLE_SEX);
        switch (v.getId()) {
            case R.id.tv_all:
                intent.putExtra("style", 0);

                break;

            case R.id.tv_boy:
                intent.putExtra("style", 1);
                break;

            case R.id.tv_girl:
                intent.putExtra("style", 2);
                break;
        }
        startActivity(intent);
    }
}
